-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-9288: declutter UI #4692
RSDK-9288: declutter UI #4692
Conversation
// TODO(RSDK-9288) - this is brittle and inconsistent with how most data is passed. | ||
// Move this to being a flag (but make sure existing workflows still work!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to keep this specific function as is, as it mirrors a well-known behavior with the cp
command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing and a flyby request, otherwise lgtm!
HideHelpCommand: true, | ||
Subcommands: []*cli.Command{ | ||
{ | ||
Name: "list", | ||
Usage: "list locations for the current user", | ||
ArgsUsage: "[organization]", | ||
Action: createCommandWithT[emptyArgs](ListLocationsAction), | ||
UsageText: "viam locations list [--organization=<organization>]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) can we maybe add a quick comment here just explaining why we aren't using the helper function?
@@ -1216,8 +1223,6 @@ func machinesPartCopyFilesAction( | |||
flagArgs machinesPartCopyFilesArgs, | |||
logger logging.Logger, | |||
) error { | |||
// TODO(RSDK-9288) - this is brittle and inconsistent with how most data is passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(flyby request) I know you didn't make this change but the definition of machinesPartCopyFilesAction
here takes a *viamClient
as an argument. Would you mind, as a quick flyby, making it a method on a viamClient
instead of taking the viamClient
as an argument? This would put the syntax more in line with how analogous functions elsewhere in the CLI are structured.
Changes:
machines part cp
command alone since it's using the same logic as the regular CLIcp
command, which most users should be more comfortable withMost of the changes can be shown through the following examples.
Before:
command
is unclear if it's supposed to be replaced or not, andarguments
is misleadingAfter: remove
arguments
and highlightcommand
is something to replace:Before: ignores login options and ignores that
command
is optionalAfter: alludes to login options and
command
is now optionalBefore: Incorrectly shows additional options and arguments when there are none
After: Show clear and correct usage
Before: incorrect command name and alludes to nonexistent other options
After: correct way to use command
Before: shows wrong usage of
org-id
flag and ignores subcommandsAfter: correct usage of
logo
without flags and with subcommands. hideshelp
subcommandBefore: Alludes to command options that don't exist, inconsistent org argument
After: add org flag (which we kept in usagetext as that's the default usage), remove arguments suggestion
Test to make sure: